#include<stdio.h>
#include<stdlib.h>
#define maxsize 100
int main(){
    int a[maxsize][maxsize];
    int c;
    scanf("%d",&c);
    for (int i=1;i<=c;i++){
            for(int j=0;j<=i;j++){
                if(j==0||j==i){
                    a[i][j]=1;
                }else {
                    a[i][j]=a[i-1][j-1]+a[i-1][j];
                }
                printf("%d ",a[i][j]);
            }
            printf("\n");
    }
}
